/*
 Navicat Premium Data Transfer

 Source Server         : zyh
 Source Server Type    : MySQL
 Source Server Version : 80027
 Source Host           : localhost:3306
 Source Schema         : db_checkin

 Target Server Type    : MySQL
 Target Server Version : 80027
 File Encoding         : 65001

 Date: 08/05/2022 20:44:36
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for apply
-- ----------------------------
DROP TABLE IF EXISTS `apply`;
CREATE TABLE `apply` (
  `apply_id` bigint NOT NULL AUTO_INCREMENT,
  `start_time` datetime DEFAULT NULL,
  `during_time` int DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `type` int DEFAULT NULL,
  `state` int DEFAULT NULL,
  `emp_id` bigint DEFAULT NULL,
  PRIMARY KEY (`apply_id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of apply
-- ----------------------------
BEGIN;
INSERT INTO `apply` VALUES (1, '2022-04-07 16:11:17', 3, '我要结婚', 2, 0, 1);
INSERT INTO `apply` VALUES (2, '2022-04-07 16:52:46', 2, '我老婆要生了', 4, 2, 1);
INSERT INTO `apply` VALUES (4, '2022-04-08 09:41:27', 1, '哺乳', 5, 0, 1);
INSERT INTO `apply` VALUES (6, '2022-04-07 21:03:32', 2, '我要去结婚！', 2, 2, 1);
INSERT INTO `apply` VALUES (7, '2022-04-10 11:02:24', 2, '我要给孩子喂奶', 5, 2, 1);
INSERT INTO `apply` VALUES (8, '2022-04-10 11:26:05', 5, '我要放年假', 1, 2, 1);
INSERT INTO `apply` VALUES (9, '2022-04-11 12:14:13', 3, '我要放年假', 1, 2, 1);
INSERT INTO `apply` VALUES (10, '2022-04-12 22:17:53', 3, '结婚！', 2, 1, 2);
INSERT INTO `apply` VALUES (11, '2022-04-14 04:44:35', 1, 'aaa', 1, 2, 1);
INSERT INTO `apply` VALUES (13, '2022-04-14 04:44:35', 1, 'bbb', 1, 2, 3);
INSERT INTO `apply` VALUES (14, '2022-04-05 03:00:00', 1, 'hyhyhy', 0, 2, 1);
INSERT INTO `apply` VALUES (15, '2022-05-12 03:00:00', 10, '我要生孩子', 4, 1, 1);
INSERT INTO `apply` VALUES (16, '2022-05-01 03:00:00', 1, '我要放年假', 1, 2, 4);
INSERT INTO `apply` VALUES (17, '2022-05-03 03:00:00', 2, '我要生孩子', 3, 2, 4);
INSERT INTO `apply` VALUES (18, '2022-05-02 03:00:00', 1, '我要生孩子', 4, 2, 4);
INSERT INTO `apply` VALUES (19, '2022-05-01 03:00:00', 2, '我要度假', 1, 0, 4);
INSERT INTO `apply` VALUES (20, '2022-05-03 03:00:00', 3, 'aaa', 1, 0, 4);
INSERT INTO `apply` VALUES (21, '2022-05-01 03:00:00', 1, 'br', 5, 0, 4);
COMMIT;

-- ----------------------------
-- Table structure for apply_record
-- ----------------------------
DROP TABLE IF EXISTS `apply_record`;
CREATE TABLE `apply_record` (
  `apply_record_id` bigint NOT NULL AUTO_INCREMENT,
  `emp_id` bigint DEFAULT NULL,
  `type` int DEFAULT NULL,
  `total_time` int DEFAULT NULL,
  `state` int DEFAULT NULL,
  PRIMARY KEY (`apply_record_id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of apply_record
-- ----------------------------
BEGIN;
INSERT INTO `apply_record` VALUES (1, 1, 1, 1, 0);
INSERT INTO `apply_record` VALUES (2, 1, 4, 2, 2);
INSERT INTO `apply_record` VALUES (3, 1, 2, 2, 2);
INSERT INTO `apply_record` VALUES (4, 1, 5, 2, 2);
INSERT INTO `apply_record` VALUES (5, 1, 1, 5, 2);
INSERT INTO `apply_record` VALUES (6, 1, 1, 3, 2);
INSERT INTO `apply_record` VALUES (7, 3, 1, 1, 2);
INSERT INTO `apply_record` VALUES (8, 1, 1, 1, 2);
INSERT INTO `apply_record` VALUES (9, 1, 0, 1, 2);
INSERT INTO `apply_record` VALUES (10, 4, 1, 1, 2);
INSERT INTO `apply_record` VALUES (11, 4, 3, 2, 2);
INSERT INTO `apply_record` VALUES (12, 4, 4, 1, 2);
INSERT INTO `apply_record` VALUES (13, 4, 5, 1, 0);
COMMIT;

-- ----------------------------
-- Table structure for check_record
-- ----------------------------
DROP TABLE IF EXISTS `check_record`;
CREATE TABLE `check_record` (
  `sign_id` bigint NOT NULL AUTO_INCREMENT,
  `time` datetime DEFAULT NULL,
  `type` int DEFAULT NULL COMMENT '0：上班打卡\n1：下班打卡\n2：外出打卡\n3：返回打卡',
  `emp_id` bigint DEFAULT NULL,
  PRIMARY KEY (`sign_id`)
) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of check_record
-- ----------------------------
BEGIN;
INSERT INTO `check_record` VALUES (1, '2022-04-06 08:06:54', 0, 1);
INSERT INTO `check_record` VALUES (2, '2022-04-06 16:07:52', 1, 1);
INSERT INTO `check_record` VALUES (3, '2022-04-04 16:08:02', 2, 1);
INSERT INTO `check_record` VALUES (4, '2022-04-05 16:08:20', 3, 1);
INSERT INTO `check_record` VALUES (5, '2022-04-06 17:18:30', 2, 1);
INSERT INTO `check_record` VALUES (6, '2022-04-06 17:30:04', 2, 1);
INSERT INTO `check_record` VALUES (7, '2022-04-06 17:31:34', 2, 1);
INSERT INTO `check_record` VALUES (8, '2022-04-06 17:32:02', 1, 1);
INSERT INTO `check_record` VALUES (9, '2022-04-06 21:49:26', 2, 1);
INSERT INTO `check_record` VALUES (10, '2022-04-06 21:53:44', 3, 1);
INSERT INTO `check_record` VALUES (11, '2022-04-09 21:01:03', 2, 1);
INSERT INTO `check_record` VALUES (12, '2022-04-10 22:00:23', 2, 1);
INSERT INTO `check_record` VALUES (13, '2022-04-13 14:31:18', 2, 1);
INSERT INTO `check_record` VALUES (14, '2022-04-13 14:36:56', 1, 1);
INSERT INTO `check_record` VALUES (15, '2022-04-29 19:57:02', 3, 1);
INSERT INTO `check_record` VALUES (16, '2022-04-29 19:57:00', 0, 1);
INSERT INTO `check_record` VALUES (17, '2022-04-29 19:57:38', 0, 1);
INSERT INTO `check_record` VALUES (18, '2022-04-29 19:57:45', 0, 1);
INSERT INTO `check_record` VALUES (19, '2022-04-29 19:58:44', 0, 1);
INSERT INTO `check_record` VALUES (20, '2022-04-30 06:28:14', 0, 1);
INSERT INTO `check_record` VALUES (21, '2022-04-30 06:29:51', 0, 1);
INSERT INTO `check_record` VALUES (22, '2022-04-30 06:29:54', 3, 1);
INSERT INTO `check_record` VALUES (23, '2022-04-30 06:30:13', 0, 1);
INSERT INTO `check_record` VALUES (24, '2022-04-30 06:30:14', 3, 1);
INSERT INTO `check_record` VALUES (25, '2022-04-30 06:32:05', 1, 1);
INSERT INTO `check_record` VALUES (26, '2022-04-30 06:32:18', 0, 1);
INSERT INTO `check_record` VALUES (27, '2022-04-30 06:32:45', 1, 1);
INSERT INTO `check_record` VALUES (28, '2022-04-30 06:32:47', 0, 1);
INSERT INTO `check_record` VALUES (29, '2022-04-30 06:32:48', 2, 1);
INSERT INTO `check_record` VALUES (30, '2022-04-30 06:32:50', 3, 1);
INSERT INTO `check_record` VALUES (31, '2022-04-30 06:32:52', 1, 1);
INSERT INTO `check_record` VALUES (32, '2022-04-30 06:32:53', 3, 1);
INSERT INTO `check_record` VALUES (33, '2022-04-30 06:32:53', 2, 1);
INSERT INTO `check_record` VALUES (34, '2022-04-30 06:32:54', 3, 1);
INSERT INTO `check_record` VALUES (35, '2022-04-30 06:32:54', 2, 1);
INSERT INTO `check_record` VALUES (36, '2022-04-30 06:32:55', 3, 1);
INSERT INTO `check_record` VALUES (37, '2022-04-30 06:45:34', 1, 1);
INSERT INTO `check_record` VALUES (38, '2022-04-30 06:45:35', 3, 1);
INSERT INTO `check_record` VALUES (39, '2022-04-30 06:47:34', 1, 1);
INSERT INTO `check_record` VALUES (40, '2022-05-02 08:36:28', 0, 1);
INSERT INTO `check_record` VALUES (41, '2022-05-02 08:36:36', 2, 1);
INSERT INTO `check_record` VALUES (42, '2022-05-02 08:36:37', 0, 1);
INSERT INTO `check_record` VALUES (43, '2022-05-02 08:36:43', 1, 1);
INSERT INTO `check_record` VALUES (44, '2022-05-02 09:12:41', 0, 1);
INSERT INTO `check_record` VALUES (45, '2022-05-02 09:12:46', 1, 1);
INSERT INTO `check_record` VALUES (46, '2022-05-02 09:15:54', 0, 1);
INSERT INTO `check_record` VALUES (47, '2022-05-02 09:18:55', 1, 1);
INSERT INTO `check_record` VALUES (48, '2022-05-02 09:18:57', 0, 1);
INSERT INTO `check_record` VALUES (49, '2022-05-02 09:18:57', 1, 1);
INSERT INTO `check_record` VALUES (50, '2022-05-02 09:18:58', 0, 1);
INSERT INTO `check_record` VALUES (51, '2022-05-02 09:19:02', 1, 1);
INSERT INTO `check_record` VALUES (52, '2022-05-02 09:19:03', 0, 1);
INSERT INTO `check_record` VALUES (53, '2022-05-02 09:19:31', 2, 1);
INSERT INTO `check_record` VALUES (54, '2022-05-02 09:20:09', 0, 1);
INSERT INTO `check_record` VALUES (55, '2022-05-02 09:20:11', 1, 1);
INSERT INTO `check_record` VALUES (56, '2022-05-02 09:20:12', 0, 1);
INSERT INTO `check_record` VALUES (57, '2022-05-02 09:20:12', 1, 1);
INSERT INTO `check_record` VALUES (58, '2022-05-02 09:22:03', 0, 1);
INSERT INTO `check_record` VALUES (59, '2022-05-02 09:22:04', 1, 1);
INSERT INTO `check_record` VALUES (60, '2022-05-02 09:22:05', 2, 1);
INSERT INTO `check_record` VALUES (61, '2022-05-02 09:22:07', 2, 1);
INSERT INTO `check_record` VALUES (62, '2022-05-02 09:22:09', 0, 1);
INSERT INTO `check_record` VALUES (63, '2022-05-02 09:22:10', 1, 1);
INSERT INTO `check_record` VALUES (64, '2022-05-02 09:22:13', 0, 1);
INSERT INTO `check_record` VALUES (65, '2022-05-02 09:22:15', 1, 1);
INSERT INTO `check_record` VALUES (66, '2022-05-02 09:22:16', 2, 1);
INSERT INTO `check_record` VALUES (67, '2022-05-02 09:22:18', 0, 1);
INSERT INTO `check_record` VALUES (68, '2022-05-02 09:23:34', 1, 1);
INSERT INTO `check_record` VALUES (69, '2022-05-02 09:25:51', 2, 1);
INSERT INTO `check_record` VALUES (70, '2022-05-02 09:25:52', 2, 1);
INSERT INTO `check_record` VALUES (71, '2022-05-02 09:25:52', 2, 1);
INSERT INTO `check_record` VALUES (72, '2022-05-02 09:25:54', 2, 1);
INSERT INTO `check_record` VALUES (73, '2022-05-02 09:25:55', 2, 1);
INSERT INTO `check_record` VALUES (74, '2022-05-02 09:25:56', 2, 1);
INSERT INTO `check_record` VALUES (75, '2022-05-02 09:25:57', 0, 1);
INSERT INTO `check_record` VALUES (76, '2022-05-02 09:26:22', 2, 1);
INSERT INTO `check_record` VALUES (77, '2022-05-02 09:26:26', 0, 1);
INSERT INTO `check_record` VALUES (78, '2022-05-02 09:26:27', 1, 1);
INSERT INTO `check_record` VALUES (79, '2022-05-02 09:26:28', 0, 1);
INSERT INTO `check_record` VALUES (80, '2022-05-02 09:26:35', 1, 1);
INSERT INTO `check_record` VALUES (81, '2022-05-02 09:26:38', 0, 1);
INSERT INTO `check_record` VALUES (82, '2022-05-02 09:26:40', 2, 1);
INSERT INTO `check_record` VALUES (83, '2022-05-02 09:26:42', 0, 1);
INSERT INTO `check_record` VALUES (84, '2022-05-02 21:39:12', 1, 1);
INSERT INTO `check_record` VALUES (85, '2022-05-02 21:39:14', 0, 1);
INSERT INTO `check_record` VALUES (86, '2022-05-02 21:39:15', 2, 1);
INSERT INTO `check_record` VALUES (87, '2022-05-02 21:39:17', 0, 1);
INSERT INTO `check_record` VALUES (88, '2022-05-02 21:39:18', 1, 1);
INSERT INTO `check_record` VALUES (89, '2022-05-02 21:59:14', 0, 1);
INSERT INTO `check_record` VALUES (90, '2022-05-02 21:59:16', 2, 1);
INSERT INTO `check_record` VALUES (91, '2022-05-02 21:59:17', 0, 1);
INSERT INTO `check_record` VALUES (92, '2022-05-03 01:55:15', 1, 1);
INSERT INTO `check_record` VALUES (93, '2022-05-03 01:55:19', 0, 1);
INSERT INTO `check_record` VALUES (94, '2022-05-03 01:55:20', 2, 1);
INSERT INTO `check_record` VALUES (95, '2022-05-03 01:55:20', 0, 1);
INSERT INTO `check_record` VALUES (96, '2022-05-03 01:55:21', 1, 1);
INSERT INTO `check_record` VALUES (97, '2022-05-03 01:55:22', 0, 1);
INSERT INTO `check_record` VALUES (98, '2022-05-03 01:55:23', 2, 1);
INSERT INTO `check_record` VALUES (99, '2022-05-03 01:55:23', 0, 1);
INSERT INTO `check_record` VALUES (100, '2022-05-03 01:55:26', 1, 1);
INSERT INTO `check_record` VALUES (101, '2022-05-03 01:55:27', 0, 1);
INSERT INTO `check_record` VALUES (102, '2022-05-03 01:55:31', 1, 1);
INSERT INTO `check_record` VALUES (103, '2022-05-03 01:55:35', 0, 1);
INSERT INTO `check_record` VALUES (104, '2022-05-03 01:55:38', 2, 1);
INSERT INTO `check_record` VALUES (105, '2022-05-03 01:55:42', 0, 1);
INSERT INTO `check_record` VALUES (106, '2022-05-03 23:00:24', 1, 1);
INSERT INTO `check_record` VALUES (107, '2022-05-03 23:00:28', 0, 1);
INSERT INTO `check_record` VALUES (108, '2022-05-03 23:00:30', 2, 1);
INSERT INTO `check_record` VALUES (109, '2022-05-03 23:00:32', 0, 1);
INSERT INTO `check_record` VALUES (110, '2022-05-07 08:44:48', 1, 1);
INSERT INTO `check_record` VALUES (111, '2022-05-07 08:44:50', 0, 1);
INSERT INTO `check_record` VALUES (112, '2022-05-07 08:45:18', 2, 1);
INSERT INTO `check_record` VALUES (113, '2022-05-07 08:45:23', 0, 1);
INSERT INTO `check_record` VALUES (114, '2022-05-07 09:06:01', 2, 1);
INSERT INTO `check_record` VALUES (115, '2022-05-07 09:06:02', 0, 1);
INSERT INTO `check_record` VALUES (116, '2022-05-07 21:30:46', 1, 1);
INSERT INTO `check_record` VALUES (117, '2022-05-07 21:30:48', 0, 1);
INSERT INTO `check_record` VALUES (118, '2022-05-07 21:30:49', 2, 1);
COMMIT;

-- ----------------------------
-- Table structure for emp_state
-- ----------------------------
DROP TABLE IF EXISTS `emp_state`;
CREATE TABLE `emp_state` (
  `state_id` bigint NOT NULL AUTO_INCREMENT,
  `emp_id` bigint DEFAULT NULL,
  `state` int DEFAULT NULL COMMENT '0：未在班\n1：在班',
  PRIMARY KEY (`state_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of emp_state
-- ----------------------------
BEGIN;
INSERT INTO `emp_state` VALUES (1, 1, 2);
INSERT INTO `emp_state` VALUES (2, 2, 1);
INSERT INTO `emp_state` VALUES (3, 4, 0);
INSERT INTO `emp_state` VALUES (4, 3, 0);
INSERT INTO `emp_state` VALUES (5, 5, 0);
INSERT INTO `emp_state` VALUES (6, 6, 0);
INSERT INTO `emp_state` VALUES (7, 7, 0);
INSERT INTO `emp_state` VALUES (8, 8, 0);
INSERT INTO `emp_state` VALUES (9, 9, 0);
COMMIT;

-- ----------------------------
-- Table structure for employer
-- ----------------------------
DROP TABLE IF EXISTS `employer`;
CREATE TABLE `employer` (
  `emp_id` bigint NOT NULL AUTO_INCREMENT,
  `account` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `gender` int DEFAULT NULL COMMENT '0：女\n1：男',
  `phone` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `role` int DEFAULT NULL,
  PRIMARY KEY (`emp_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of employer
-- ----------------------------
BEGIN;
INSERT INTO `employer` VALUES (1, '2021229033', '赵奕涵', 1, '17320095328', '123456', 'tju_zyh@gamin.com', '2022-04-06 16:32:38', 1);
INSERT INTO `employer` VALUES (2, '2021229038', '朱亚乔', 1, '18287828378', '123456', 'zyq182u3@163.com', '2022-04-05 20:33:18', 0);
INSERT INTO `employer` VALUES (3, '2021229088', '方颖', 0, '15029839292', '123456', 'fy78382@11.com', '2022-04-10 20:20:53', 3);
INSERT INTO `employer` VALUES (4, '2021229072', '马晓春', 1, '15829892981', '123456', 'mxc312@qq.com', '2022-04-10 20:52:42', 4);
INSERT INTO `employer` VALUES (5, '1231231', '派大星', 1, '1231231232', '222', '111', '2022-04-29 11:00:00', 0);
INSERT INTO `employer` VALUES (6, '123123', '海绵宝宝', 1, '34343434343', '2323343', '1111111', '2022-04-29 11:00:00', 0);
INSERT INTO `employer` VALUES (7, '1231231323', '闫浩然', 1, '2312', '1231', '1231231', '2022-04-29 11:00:00', 5);
INSERT INTO `employer` VALUES (8, '20212232323', '大胖', 0, '18928929232', '123456', '189391@qq.com', '2022-05-06 11:00:00', 0);
INSERT INTO `employer` VALUES (9, '2021229079', '杨展', 1, '13565567682', '123456', 'sdhushud@163.com', '2022-05-07 11:00:00', 3);
COMMIT;

-- ----------------------------
-- Table structure for left_vacation
-- ----------------------------
DROP TABLE IF EXISTS `left_vacation`;
CREATE TABLE `left_vacation` (
  `left_id` bigint NOT NULL AUTO_INCREMENT,
  `emp_id` bigint DEFAULT NULL,
  `left_year` int DEFAULT NULL,
  `left_hun_jia` int DEFAULT NULL,
  `left_chan_jian` int DEFAULT NULL,
  `left_chan_jia` int DEFAULT NULL,
  `left_bu_ru` int DEFAULT NULL,
  `left_pei_chan` int DEFAULT NULL,
  PRIMARY KEY (`left_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of left_vacation
-- ----------------------------
BEGIN;
INSERT INTO `left_vacation` VALUES (1, 1, 0, 1, 3, 18, 28, 5);
INSERT INTO `left_vacation` VALUES (2, 4, 6, 3, 1, 19, 30, 5);
INSERT INTO `left_vacation` VALUES (3, 2, 7, 3, 3, 20, 30, 5);
INSERT INTO `left_vacation` VALUES (4, 3, 6, 3, 3, 20, 30, 5);
INSERT INTO `left_vacation` VALUES (5, 5, 7, 3, 3, 20, 30, 5);
INSERT INTO `left_vacation` VALUES (6, 6, 7, 3, 3, 20, 30, 5);
INSERT INTO `left_vacation` VALUES (7, 7, 7, 3, 3, 20, 30, 5);
INSERT INTO `left_vacation` VALUES (8, 8, 7, 3, 3, 20, 30, 5);
INSERT INTO `left_vacation` VALUES (9, 9, 7, 3, 3, 20, 30, 5);
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `user_id` bigint NOT NULL,
  `account` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `gender` int DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `create_time` date DEFAULT NULL,
  `role` int DEFAULT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES (1, '17320095328', '赵奕涵', 1, '17320095328', '123456', 'tju_zyh@gmail.com', '2022-03-28', 1);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
